Repository navigation
Conversation
…-ai-alibaba#266) FeasibilityAssessmentNode 的提示词缺少 TableRelationNode 已计算好的语义模型, 导致使用业务术语/同义词表达指标口径时可行性评估缺少映射依据。 - feasibility-assessment.txt: 指令边界与判定顺序补充语义模型使用规则,新增「## 语义模型」输入小节 - PromptHelper.buildFeasibilityAssessmentPrompt: 新增 semanticModel 参数 - FeasibilityAssessmentNode: 从 state 读取 GENEGRATED_SEMANTIC_MODEL_PROMPT 传入模板 - 测试: PromptHelperTest 与 FeasibilityAssessmentNodeTest 同步更新,新增语义模型注入用例
pwd11
force-pushed
the
fix/266-feasibility-semantic-model
branch
from
September 6, 2026 08:50
76c4fe2 to
01660a2
Compare
PromptConstantTest 的全量渲染校验要求模板变量全部声明;feasibility-assessment
模板新增 {semantic_model} 后补充契约变量,避免全量测试失败。
Author
|
@zxuexingzhijie 按要求整理的实现文档已于 9 月 26 日发布到 #266,PR 正文也已补充入口。 文档覆盖数据流、具体改动、Schema 使用边界、空值兼容、前后输入示例和验证依据,并区分了 mock 测试能够证明的参数传递与尚未实测的真实模型效果。对应当前提交 |
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Describe what this PR does / why we need it
FeasibilityAssessmentNode 的提示词目前只包含规范化查询、召回 Schema、Evidence 和多轮历史,缺少 TableRelationNode 已经计算好的语义模型(
GENEGRATED_SEMANTIC_MODEL_PROMPT)。当用户使用业务术语/同义词表达指标口径时,可行性评估节点缺少映射依据,容易误判为 NEED_CLARIFICATION 或漏掉 Schema 可支持的查询。本次修改把语义模型渲染进 feasibility-assessment 模板,处理方式与 PlannerNode 保持一致。
Does this pull request fix one issue?
Fixes #266
Describe how you did it
实现文档(背景、数据流、实现细节、前后示例与验证边界):#266 (comment)
prompts/feasibility-assessment.txt:指令边界与判定顺序补充语义模型使用规则;输入数据区新增「## 语义模型」小节PromptHelper.buildFeasibilityAssessmentPrompt(...):新增semanticModel参数并渲染{semantic_model}FeasibilityAssessmentNode.apply(...):从 state 读取GENEGRATED_SEMANTIC_MODEL_PROMPT(TableRelationNode 已写入)传入模板PromptHelperTest更新参数与断言;FeasibilityAssessmentNodeTest注册新 state key 并新增apply_withSemanticModel_includesModelInPrompt用例Describe how to verify it
./mvnw -pl data-agent-management -Dtest=PromptHelperTest,FeasibilityAssessmentNodeTest test— 38 个用例全部通过./mvnw -pl data-agent-management spotless:check checkstyle:check— 0 violationsSpecial notes for reviews